<?php
// -----------------------------------------------------------------------------

include "../../config/config.php";
include "../../auth.php";
include "../../DBManager.php";

// -----------------------------------------------------------------------------

if (!isset($_GET["id"])) {
    exit("需要传入有效的参数！");
}

$id = $_GET["id"];

// -----------------------------------------------------------------------------

$dbPath = "../../" . $dbPath;
$db = new DBManager("sqlite:" . $dbPath);

// -----------------------------------------------------------------------------

try {
    echo $db->readFromPurchased($id);
} catch (Exception $e) {
    echo $e->getMessage();
}
